<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 鼠标事件对象 MouseEvent
    document.addEventListener('click', function (e) {
      // 1.client 鼠标在可视区域的坐标
      console.log(e.clientX);
      console.log(e.clientY);
      console.log('---------------');
      // 2.page 鼠标在文档的坐标
      console.log(e.pageX);
      console.log(e.pageY);
    })
  </script>
</body>

</html>